<HTML>
<BODY bgcolor="#ffffff" text="#000000">
<A NAME = "Proc161"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ComponentDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ComponentDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ComponentDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ComponentId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Component</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ComponentId = @ComponentId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'ComponentDelProc: Cannot delete because foreign keys still exist in Component '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ComponentDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ComponentDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc162"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ComponentInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ComponentInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ComponentInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ComponentSequence&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @HardwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @OperatingSystemId&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO Component(ComponentSequence,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@ComponentSequence,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @DigitalFormatId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @HardwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @OperatingSystemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SoftwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'ComponentInsProc: Cannot insert because primary key value not found in Component '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ComponentInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ComponentInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc163"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ComponentSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ComponentSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ComponentSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ComponentId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT ComponentId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ComponentSequence,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Component</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ComponentId = @ComponentId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ComponentSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ComponentSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc164"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ComponentUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ComponentUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ComponentUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ComponentId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ComponentSequence&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @HardwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @OperatingSystemId&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE Component</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET ComponentSequence&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ComponentSequence,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigitalFormatId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @HardwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @OperatingSystemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SoftwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ComponentId = @ComponentId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'ComponentUpdProc: Cannot update&nbsp&nbsp in Component '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ComponentUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ComponentUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc165"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DEMO_CreateDigitalFormat&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DEMO_CreateDigitalFormat </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [DEMO_CreateDigitalFormat]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @DigitalFormatFileType VARCHAR (3),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @DigitalFormatMIMEType VARCHAR (50)</TT><BR><TT></TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[DigitalFormat]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([DigitalFormatFileType]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[DigitalFormatMimeType]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@DigitalFormatFileType</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@DigitalFormatMimeType</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GETDATE()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Arizona State Library Archivist')</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp RETURN @@IDENTITY</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DEMO_CreateDigitalFormat Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DEMO_CreateDigitalFormat Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc166"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DEMO_CreateProvenance&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DEMO_CreateProvenance </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [DEMO_CreateProvenance]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp (@ProvenanceName VARCHAR (100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceAdministrativeHistory VARCHAR (MAX))</TT><BR><TT>AS</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON;</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[Provenance]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([ProvenanceName]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[ProvenanceAdministrativeHistory]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@ProvenanceName</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@ProvenanceAdministrativeHistory</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GetDate()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Arizona State Library Archivist')</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp RETURN @@IDENTITY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DEMO_CreateProvenance Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DEMO_CreateProvenance Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc167"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DEMO_CreateSeries&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DEMO_CreateSeries </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [DEMO_CreateSeries]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesTitle VARCHAR (250),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesDescription VARCHAR (MAX),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesOpenDate DATETIME,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesStartYear INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesDateRangeDescription VARCHAR (100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesExtentDescription VARCHAR (1024),&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesArrangement VARCHAR (1024),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesRestrictionDescription VARCHAR (1024),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesGeneralNote VARCHAR (MAX),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesIdentifier VARCHAR (50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesActivity VARCHAR (50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceId INT</TT><BR><TT></TT><BR><TT>AS</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[Series]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([SeriesTitle]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesDescription]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesOpenDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesStartYear]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesDateRangeDescription]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesExtentDescription]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesArrangement]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesRestrictionDescription]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesGeneralNote]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesIdentifier]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesActivity]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[ProvenanceId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@SeriesTitle</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesDescription</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesOpenDate</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesStartYear</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesDateRangeDescription</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesExtentDescription</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesArrangement</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesRestrictionDescription</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesGeneralNote</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesIdentifier</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesActivity</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@ProvenanceId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GETDATE()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Arizona State Library Archivist')</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp RETURN @@IDENTITY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DEMO_CreateSeries Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DEMO_CreateSeries Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc168"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DEMO_CreateSeriesAquisition&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DEMO_CreateSeriesAquisition </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [DEMO_CreateSeriesAquisition]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionAccesionNumber VARCHAR (50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionSource VARCHAR (100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionDirectory VARCHAR (255)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[SeriesAcquisition]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([SeriesId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionIngestDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionReadyToIngest]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionIngested]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionAccessionNumber]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionSource]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionDirectory]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionReceivedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (1,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp GetDATE(),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp 1,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp 0,&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionAccesionNumber,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionSource</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesAcquisitionDirectory</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GetDate()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GetDate()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Arizona State Library Archivist')</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp RETURN @@IDENTITY</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DEMO_CreateSeriesAquisition Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DEMO_CreateSeriesAquisition Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc169"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DEMO_CreateSoftware&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DEMO_CreateSoftware </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [DEMO_CreateSoftware]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SoftwareName VARCHAR (50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SoftwareVersion VARCHAR (20)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT></TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[Software](</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareVersion,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@SoftwareName</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SoftwareVersion</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GETDATE()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Arizona State Library Archivist')</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp RETURN @@IDENTITY</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DEMO_CreateSoftware Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DEMO_CreateSoftware Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc170"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigestAlgorithmDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigestAlgorithmDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigestAlgorithmDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigestAlgorithmId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM DigestAlgorithm</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE DigestAlgorithmId = @DigestAlgorithmId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'DigestAlgorithmDelProc: Cannot delete because foreign keys still exist in DigestAlgorithm '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigestAlgorithmDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigestAlgorithmDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc171"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigestAlgorithmInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigestAlgorithmInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigestAlgorithmInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigestAlgorithmName&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO DigestAlgorithm(DigestAlgorithmName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@DigestAlgorithmName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'DigestAlgorithmInsProc: Cannot insert because primary key value not found in DigestAlgorithm '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigestAlgorithmInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigestAlgorithmInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc172"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigestAlgorithmSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigestAlgorithmSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigestAlgorithmSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigestAlgorithmId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT DigestAlgorithmId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigestAlgorithmName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM DigestAlgorithm</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE DigestAlgorithmId = @DigestAlgorithmId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigestAlgorithmSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigestAlgorithmSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc173"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigestAlgorithmUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigestAlgorithmUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigestAlgorithmUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigestAlgorithmId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigestAlgorithmName&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE DigestAlgorithm</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET DigestAlgorithmName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigestAlgorithmName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE DigestAlgorithmId = @DigestAlgorithmId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'DigestAlgorithmUpdProc: Cannot update&nbsp&nbsp in DigestAlgorithm '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigestAlgorithmUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigestAlgorithmUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc174"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalFormatDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalFormatDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalFormatDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM DigitalFormat</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE DigitalFormatId = @DigitalFormatId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'DigitalFormatDelProc: Cannot delete because foreign keys still exist in DigitalFormat '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc175"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalFormatInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalFormatInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalFormatInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatFileType&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(5),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRenderingSoftwareName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRenderingSoftwareVersion&nbsp&nbsp&nbsp&nbsp&nbsp varchar(20)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatMIMEType&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO DigitalFormat(DigitalFormatFileType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatRenderingSoftwareName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatRenderingSoftwareVersion,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatRegistryId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatMIMEType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@DigitalFormatFileType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @DigitalFormatRenderingSoftwareName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @DigitalFormatRenderingSoftwareVersion,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @DigitalFormatMIMEType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'DigitalFormatInsProc: Cannot insert because primary key value not found in DigitalFormat '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc176"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalFormatRegistryDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalFormatRegistryDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalFormatRegistryDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM DigitalFormatRegistry</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE DigitalFormatRegistryId = @DigitalFormatRegistryId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'DigitalFormatRegistryDelProc: Cannot delete because foreign keys still exist in DigitalFormatRegistry '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistryDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistryDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc177"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalFormatRegistryInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalFormatRegistryInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalFormatRegistryInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryRoleId&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO DigitalFormatRegistry(DigitalFormatRegistryName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatRegistryRoleId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@DigitalFormatRegistryName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryRoleId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'DigitalFormatRegistryInsProc: Cannot insert because primary key value not found in DigitalFormatRegistry '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistryInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistryInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc178"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalFormatRegistryRoleDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalFormatRegistryRoleDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalFormatRegistryRoleDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryRoleId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM DigitalFormatRegistryRole</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE DigitalFormatRegistryRoleId = @DigitalFormatRegistryRoleId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'DigitalFormatRegistryRoleDelProc: Cannot delete because foreign keys still exist in DigitalFormatRegistryRole '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistryRoleDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistryRoleDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc179"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalFormatRegistryRoleInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalFormatRegistryRoleInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalFormatRegistryRoleInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryRoleName&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO DigitalFormatRegistryRole(DigitalFormatRegistryRoleName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@DigitalFormatRegistryRoleName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'DigitalFormatRegistryRoleInsProc: Cannot insert because primary key value not found in DigitalFormatRegistryRole '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistryRoleInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistryRoleInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc180"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalFormatRegistryRoleSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalFormatRegistryRoleSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalFormatRegistryRoleSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryRoleId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT DigitalFormatRegistryRoleId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatRegistryRoleName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM DigitalFormatRegistryRole</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE DigitalFormatRegistryRoleId = @DigitalFormatRegistryRoleId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistryRoleSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistryRoleSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc181"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalFormatRegistryRoleUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalFormatRegistryRoleUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalFormatRegistryRoleUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryRoleId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryRoleName&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE DigitalFormatRegistryRole</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET DigitalFormatRegistryRoleName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigitalFormatRegistryRoleName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE DigitalFormatRegistryRoleId = @DigitalFormatRegistryRoleId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'DigitalFormatRegistryRoleUpdProc: Cannot update&nbsp&nbsp in DigitalFormatRegistryRole '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistryRoleUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistryRoleUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc182"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalFormatRegistrySelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalFormatRegistrySelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalFormatRegistrySelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT DigitalFormatRegistryId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatRegistryName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatRegistryRoleId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM DigitalFormatRegistry</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE DigitalFormatRegistryId = @DigitalFormatRegistryId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistrySelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistrySelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc183"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalFormatRegistryUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalFormatRegistryUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalFormatRegistryUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryRoleId&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE DigitalFormatRegistry</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET DigitalFormatRegistryName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigitalFormatRegistryName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatRegistryRoleId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigitalFormatRegistryRoleId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE DigitalFormatRegistryId = @DigitalFormatRegistryId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'DigitalFormatRegistryUpdProc: Cannot update&nbsp&nbsp in DigitalFormatRegistry '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistryUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatRegistryUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc184"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalFormatSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalFormatSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalFormatSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT DigitalFormatId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatFileType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatRenderingSoftwareName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatRenderingSoftwareVersion,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatRegistryId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatMIMEType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM DigitalFormat</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE DigitalFormatId = @DigitalFormatId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc185"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalFormatUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalFormatUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalFormatUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatFileType&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(5),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRenderingSoftwareName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRenderingSoftwareVersion&nbsp&nbsp&nbsp&nbsp&nbsp varchar(20)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatRegistryId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatMIMEType&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE DigitalFormat</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET DigitalFormatFileType&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigitalFormatFileType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatRenderingSoftwareName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigitalFormatRenderingSoftwareName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatRenderingSoftwareVersion&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigitalFormatRenderingSoftwareVersion,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatRegistryId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigitalFormatRegistryId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatMIMEType&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigitalFormatMIMEType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE DigitalFormatId = @DigitalFormatId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'DigitalFormatUpdProc: Cannot update&nbsp&nbsp in DigitalFormat '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalFormatUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc186"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalSignatureKeyDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalSignatureKeyDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalSignatureKeyDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM DigitalSignatureKey</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE DigitalSignatureKeyId = @DigitalSignatureKeyId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'DigitalSignatureKeyDelProc: Cannot delete because foreign keys still exist in DigitalSignatureKey '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalSignatureKeyDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalSignatureKeyDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc187"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalSignatureKeyInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalSignatureKeyInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalSignatureKeyInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyType&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyValue&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyInformation&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyVerification&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO DigitalSignatureKey(DigitalSignatureKeyType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalSignatureKeyValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalSignatureKeyInformation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalSignatureKeyVerification,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@DigitalSignatureKeyType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyInformation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyVerification,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'DigitalSignatureKeyInsProc: Cannot insert because primary key value not found in DigitalSignatureKey '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalSignatureKeyInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalSignatureKeyInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc188"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalSignatureKeySelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalSignatureKeySelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalSignatureKeySelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT DigitalSignatureKeyId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalSignatureKeyType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalSignatureKeyValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalSignatureKeyInformation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalSignatureKeyVerification,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM DigitalSignatureKey</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE DigitalSignatureKeyId = @DigitalSignatureKeyId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalSignatureKeySelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalSignatureKeySelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc189"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">DigitalSignatureKeyUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: DigitalSignatureKeyUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE DigitalSignatureKeyUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyType&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyValue&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyInformation&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyVerification&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE DigitalSignatureKey</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET DigitalSignatureKeyType&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigitalSignatureKeyType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalSignatureKeyValue&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigitalSignatureKeyValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalSignatureKeyInformation&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigitalSignatureKeyInformation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalSignatureKeyVerification&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigitalSignatureKeyVerification,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE DigitalSignatureKeyId = @DigitalSignatureKeyId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'DigitalSignatureKeyUpdProc: Cannot update&nbsp&nbsp in DigitalSignatureKey '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalSignatureKeyUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">DigitalSignatureKeyUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc190"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">FilingUnitDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: FilingUnitDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE FilingUnitDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @FilingUnitId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM FilingUnit</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE FilingUnitId = @FilingUnitId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'FilingUnitDelProc: Cannot delete because foreign keys still exist in FilingUnit '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">FilingUnitDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">FilingUnitDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc191"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">FilingUnitInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: FilingUnitInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE FilingUnitInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @FilingUnitName&nbsp&nbsp&nbsp&nbsp&nbsp varchar(255),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO FilingUnit(FilingUnitName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@FilingUnitName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'FilingUnitInsProc: Cannot insert because primary key value not found in FilingUnit '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">FilingUnitInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">FilingUnitInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc192"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">FilingUnitSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: FilingUnitSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE FilingUnitSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @FilingUnitId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT FilingUnitId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FilingUnitName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM FilingUnit</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE FilingUnitId = @FilingUnitId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">FilingUnitSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">FilingUnitSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc193"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">FilingUnitUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: FilingUnitUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE FilingUnitUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @FilingUnitId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @FilingUnitName&nbsp&nbsp&nbsp&nbsp&nbsp varchar(255),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE FilingUnit</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET FilingUnitName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @FilingUnitName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE FilingUnitId = @FilingUnitId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'FilingUnitUpdProc: Cannot update&nbsp&nbsp in FilingUnit '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">FilingUnitUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">FilingUnitUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc195"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">HardwareDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: HardwareDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE HardwareDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @HardwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Hardware</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE HardwareId = @HardwareId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'HardwareDelProc: Cannot delete because foreign keys still exist in Hardware '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">HardwareDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">HardwareDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc196"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">HardwareInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: HardwareInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE HardwareInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @HardwareName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @HardwareType&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp char(10)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @HardwareLocation&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @HardwareDocumentation&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO Hardware(HardwareName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareLocation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareDocumentation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@HardwareName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @HardwareType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @HardwareLocation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @HardwareDocumentation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'HardwareInsProc: Cannot insert because primary key value not found in Hardware '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">HardwareInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">HardwareInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc197"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">HardwareSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: HardwareSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE HardwareSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @HardwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT HardwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareLocation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareDocumentation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Hardware</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE HardwareId = @HardwareId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">HardwareSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">HardwareSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc198"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">HardwareUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: HardwareUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE HardwareUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @HardwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @HardwareName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @HardwareType&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp char(10)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @HardwareLocation&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @HardwareDocumentation&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE Hardware</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET HardwareName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @HardwareName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareType&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @HardwareType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareLocation&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @HardwareLocation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareDocumentation&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @HardwareDocumentation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE HardwareId = @HardwareId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'HardwareUpdProc: Cannot update&nbsp&nbsp in Hardware '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">HardwareUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">HardwareUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc199"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">InsertException&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: InsertException </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE Procedure [InsertException]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @Desc INT</TT><BR><TT>AS</TT><BR><TT>INSERT INTO [PeDALS_DLB].[dbo].[Exceptions]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([ProvenanceId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[Description]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @Desc,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp GETDATE(),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp 'BizTalk'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp )</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">InsertException Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">InsertException Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc200"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemDateDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemDateDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemDateDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemDateValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(35))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ItemDate</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemDateValue = @ItemDateValue</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'ItemDateDelProc: Cannot delete because foreign keys still exist in ItemDate '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemDateDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemDateDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc201"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemDateInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemDateInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemDateInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @QualifierId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemDateValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(35),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO ItemDate(ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemDateValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemDateValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'ItemDateInsProc: Cannot insert because primary key value not found in ItemDate '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemDateInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemDateInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc202"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemDateSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemDateSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemDateSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemDateValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(35))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemDateValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ItemDate</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemDateValue = @ItemDateValue</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemDateSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemDateSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc203"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemDateUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemDateUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemDateUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @QualifierId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemDateValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(35),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE ItemDate</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemDateValue = @ItemDateValue</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'ItemDateUpdProc: Cannot update&nbsp&nbsp in ItemDate '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemDateUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemDateUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc204"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Item</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemId = @ItemId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'ItemDelProc: Cannot delete because foreign keys still exist in Item '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc205"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemTitle&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemDisplayTitle&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemExtentDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemOpenDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemSample&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemReceivedFileName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemOriginatorIdentifier&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemLanguage&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp char(3)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemAccessFacilitators&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemExceptions&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @HardwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @OperatingSystemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigestAlgorithmId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemReceivedHashOriginator&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemReceivedHashDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemReceivedHashValue&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(256)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemTechnicalInfrastructure&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemGeneralNote&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @FilingUnitId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SuperPackageId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(13)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemGeoLocationId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO Item(ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemDisplayTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemExtentDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemOpenDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSample,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemReceivedFileName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemOriginatorIdentifier,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemLanguage,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemAccessFacilitators,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemExceptions,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigestAlgorithmId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemReceivedHashOriginator,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemReceivedHashDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemReceivedHashValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemTechnicalInfrastructure,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemGeneralNote,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FilingUnitId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SuperPackageId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemGeoLocationId)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemDisplayTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemExtentDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemOpenDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemSample,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemReceivedFileName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemOriginatorIdentifier,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemLanguage,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemAccessFacilitators,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemExceptions,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @HardwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @OperatingSystemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SoftwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @DigestAlgorithmId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemReceivedHashOriginator,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemReceivedHashDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemReceivedHashValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemTechnicalInfrastructure,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemGeneralNote,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @DigitalFormatId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @FilingUnitId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SuperPackageId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemGeoLocationId)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'ItemInsProc: Cannot insert because primary key value not found in Item '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc206"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemKeywordDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemKeywordDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemKeywordDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @Keyword&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ItemKeyword</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE Keyword = @Keyword</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'ItemKeywordDelProc: Cannot delete because foreign keys still exist in ItemKeyword '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemKeywordDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemKeywordDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc207"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemKeywordInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemKeywordInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemKeywordInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @Keyword&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO ItemKeyword(ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Keyword,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @Keyword,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'ItemKeywordInsProc: Cannot insert because primary key value not found in ItemKeyword '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemKeywordInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemKeywordInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc208"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemKeywordSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemKeywordSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemKeywordSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @Keyword&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp Keyword,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ItemKeyword</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE Keyword = @Keyword</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemKeywordSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemKeywordSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc209"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemKeywordUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemKeywordUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemKeywordUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @Keyword&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE ItemKeyword</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE Keyword = @Keyword</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'ItemKeywordUpdProc: Cannot update&nbsp&nbsp in ItemKeyword '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemKeywordUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemKeywordUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc210"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemLocationDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemLocationDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemLocationDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemLocationId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ItemLocation</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemLocationId = @ItemLocationId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'ItemLocationDelProc: Cannot delete because foreign keys still exist in ItemLocation '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemLocationDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemLocationDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc211"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemLocationInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemLocationInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemLocationInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemLocationId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemGeoLocationValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO ItemLocation(ItemLocationId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemGeoLocationValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@ItemLocationId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemGeoLocationValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'ItemLocationInsProc: Cannot insert because primary key value not found in ItemLocation '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemLocationInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemLocationInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc212"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemLocationSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemLocationSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemLocationSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemLocationId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT ItemLocationId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemGeoLocationValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ItemLocation</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemLocationId = @ItemLocationId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemLocationSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemLocationSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc213"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemLocationUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemLocationUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemLocationUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemLocationId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemGeoLocationValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE ItemLocation</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET ItemGeoLocationValue&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemGeoLocationValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemLocationId = @ItemLocationId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'ItemLocationUpdProc: Cannot update&nbsp&nbsp in ItemLocation '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemLocationUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemLocationUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc214"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemOtherIdentifierDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemOtherIdentifierDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemOtherIdentifierDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemOtherIdentiferValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ItemOtherIdentifier</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemOtherIdentiferValue = @ItemOtherIdentiferValue</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'ItemOtherIdentifierDelProc: Cannot delete because foreign keys still exist in ItemOtherIdentifier '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemOtherIdentifierDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemOtherIdentifierDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc215"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemOtherIdentifierInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemOtherIdentifierInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemOtherIdentifierInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @QualifierId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemOtherIdentiferValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO ItemOtherIdentifier(ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemOtherIdentiferValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemOtherIdentiferValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'ItemOtherIdentifierInsProc: Cannot insert because primary key value not found in ItemOtherIdentifier '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemOtherIdentifierInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemOtherIdentifierInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc216"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemOtherIdentifierSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemOtherIdentifierSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemOtherIdentifierSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemOtherIdentiferValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemOtherIdentiferValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ItemOtherIdentifier</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemOtherIdentiferValue = @ItemOtherIdentiferValue</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemOtherIdentifierSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemOtherIdentifierSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc217"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemOtherIdentifierUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemOtherIdentifierUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemOtherIdentifierUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @QualifierId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemOtherIdentiferValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE ItemOtherIdentifier</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemOtherIdentiferValue = @ItemOtherIdentiferValue</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'ItemOtherIdentifierUpdProc: Cannot update&nbsp&nbsp in ItemOtherIdentifier '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemOtherIdentifierUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemOtherIdentifierUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc218"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemPartyDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemPartyDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemPartyDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemPartyValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ItemParty</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemPartyValue = @ItemPartyValue</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'ItemPartyDelProc: Cannot delete because foreign keys still exist in ItemParty '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemPartyDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemPartyDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc219"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemPartyInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemPartyInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemPartyInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @QualifierId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemPartyValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO ItemParty(ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemPartyValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemPartyValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'ItemPartyInsProc: Cannot insert because primary key value not found in ItemParty '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemPartyInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemPartyInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc220"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemPartySelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemPartySelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemPartySelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemPartyValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemPartyValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ItemParty</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemPartyValue = @ItemPartyValue</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemPartySelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemPartySelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc221"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemPartyUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemPartyUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemPartyUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @QualifierId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemPartyValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE ItemParty</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemPartyValue = @ItemPartyValue</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'ItemPartyUpdProc: Cannot update&nbsp&nbsp in ItemParty '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemPartyUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemPartyUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc222"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemDisplayTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemExtentDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemOpenDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSample,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemReceivedFileName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemOriginatorIdentifier,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemLanguage,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemAccessFacilitators,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemExceptions,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigestAlgorithmId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemReceivedHashOriginator,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemReceivedHashDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemReceivedHashValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemTechnicalInfrastructure,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemGeneralNote,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FilingUnitId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SuperPackageId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemGeoLocationId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Item</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemId = @ItemId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc223"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemSignatureDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemSignatureDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemSignatureDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemSignatureValue&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ItemSignature</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND ItemSignatureValue = @ItemSignatureValue</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'ItemSignatureDelProc: Cannot delete because foreign keys still exist in ItemSignature '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemSignatureDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemSignatureDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc224"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemSignatureInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemSignatureInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemSignatureInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemSignatureValue&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemSignatureSigner&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp char(10)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemSignatureInformationEncoding&nbsp&nbsp&nbsp&nbsp&nbsp char(10)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemSignatureMethod&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp char(10)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemSignatureProperties&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp char(10)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO ItemSignature(ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSignatureValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSignatureSigner,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSignatureInformationEncoding,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSignatureMethod,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSignatureProperties,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalSignatureKeyId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemSignatureValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemSignatureSigner,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemSignatureInformationEncoding,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemSignatureMethod,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemSignatureProperties,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'ItemSignatureInsProc: Cannot insert because primary key value not found in ItemSignature '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemSignatureInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemSignatureInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc225"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemSignatureSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemSignatureSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemSignatureSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemSignatureValue&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSignatureValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSignatureSigner,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSignatureInformationEncoding,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSignatureMethod,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSignatureProperties,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalSignatureKeyId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ItemSignature</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND ItemSignatureValue = @ItemSignatureValue</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemSignatureSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemSignatureSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc226"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemSignatureUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemSignatureUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemSignatureUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemSignatureValue&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemSignatureSigner&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp char(10)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemSignatureInformationEncoding&nbsp&nbsp&nbsp&nbsp&nbsp char(10)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemSignatureMethod&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp char(10)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemSignatureProperties&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp char(10)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalSignatureKeyId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE ItemSignature</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET ItemSignatureSigner&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemSignatureSigner,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSignatureInformationEncoding&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemSignatureInformationEncoding,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSignatureMethod&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemSignatureMethod,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSignatureProperties&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemSignatureProperties,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalSignatureKeyId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigitalSignatureKeyId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND ItemSignatureValue = @ItemSignatureValue</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'ItemSignatureUpdProc: Cannot update&nbsp&nbsp in ItemSignature '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemSignatureUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemSignatureUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc227"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemTitle&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemDisplayTitle&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemExtentDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemOpenDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemSample&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemReceivedFileName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemOriginatorIdentifier&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemLanguage&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp char(3)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemAccessFacilitators&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemExceptions&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @HardwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @OperatingSystemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigestAlgorithmId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemReceivedHashOriginator&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemReceivedHashDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemReceivedHashValue&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(256)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemTechnicalInfrastructure&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemGeneralNote&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @DigitalFormatId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @FilingUnitId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SuperPackageId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(13)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemGeoLocationId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE Item</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemTitle&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemDisplayTitle&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemDisplayTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemExtentDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemExtentDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemOpenDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemOpenDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemSample&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemSample,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemReceivedFileName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemReceivedFileName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemOriginatorIdentifier&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemOriginatorIdentifier,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemLanguage&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemLanguage,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemAccessFacilitators&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemAccessFacilitators,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemExceptions&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemExceptions,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp HardwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @HardwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @OperatingSystemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SoftwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigestAlgorithmId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigestAlgorithmId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemReceivedHashOriginator&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemReceivedHashOriginator,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemReceivedHashDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemReceivedHashDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemReceivedHashValue&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemReceivedHashValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemTechnicalInfrastructure&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemTechnicalInfrastructure,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemGeneralNote&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemGeneralNote,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DigitalFormatId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @DigitalFormatId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FilingUnitId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @FilingUnitId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SuperPackageId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SuperPackageId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemGeoLocationId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemGeoLocationId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemId = @ItemId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'ItemUpdProc: Cannot update&nbsp&nbsp in Item '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc228"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemVariantTitleDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemVariantTitleDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemVariantTitleDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemVariantTitle&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ItemVariantTitle</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemVariantTitle = @ItemVariantTitle</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'ItemVariantTitleDelProc: Cannot delete because foreign keys still exist in ItemVariantTitle '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemVariantTitleDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemVariantTitleDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc229"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemVariantTitleInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemVariantTitleInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemVariantTitleInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemVariantTitle&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO ItemVariantTitle(ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemVariantTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemVariantTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'ItemVariantTitleInsProc: Cannot insert because primary key value not found in ItemVariantTitle '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemVariantTitleInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemVariantTitleInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc230"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemVariantTitleSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemVariantTitleSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemVariantTitleSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemVariantTitle&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemVariantTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ItemVariantTitle</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemVariantTitle = @ItemVariantTitle</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemVariantTitleSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemVariantTitleSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc231"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ItemVariantTitleUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ItemVariantTitleUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ItemVariantTitleUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemVariantTitle&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE ItemVariantTitle</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemVariantTitle = @ItemVariantTitle</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'ItemVariantTitleUpdProc: Cannot update&nbsp&nbsp in ItemVariantTitle '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemVariantTitleUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ItemVariantTitleUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc232"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">OperatingSystemDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: OperatingSystemDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE OperatingSystemDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @OperatingSystemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM OperatingSystem</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE OperatingSystemId = @OperatingSystemId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'OperatingSystemDelProc: Cannot delete because foreign keys still exist in OperatingSystem '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">OperatingSystemDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">OperatingSystemDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc233"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">OperatingSystemInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: OperatingSystemInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE OperatingSystemInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @OperatingSystemName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @OperatingSystemVersion&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(20)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @OperatingSystemLocation&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @OperatingSystemDocumentation&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO OperatingSystem(OperatingSystemName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemVersion,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemLocation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemDocumentation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@OperatingSystemName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @OperatingSystemVersion,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @OperatingSystemLocation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @OperatingSystemDocumentation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'OperatingSystemInsProc: Cannot insert because primary key value not found in OperatingSystem '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">OperatingSystemInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">OperatingSystemInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc234"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">OperatingSystemSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: OperatingSystemSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE OperatingSystemSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @OperatingSystemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT OperatingSystemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemVersion,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemLocation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemDocumentation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM OperatingSystem</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE OperatingSystemId = @OperatingSystemId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">OperatingSystemSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">OperatingSystemSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc235"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">OperatingSystemUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: OperatingSystemUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE OperatingSystemUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @OperatingSystemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @OperatingSystemName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @OperatingSystemVersion&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(20)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @OperatingSystemLocation&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @OperatingSystemDocumentation&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE OperatingSystem</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET OperatingSystemName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @OperatingSystemName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemVersion&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @OperatingSystemVersion,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemLocation&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @OperatingSystemLocation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp OperatingSystemDocumentation&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @OperatingSystemDocumentation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE OperatingSystemId = @OperatingSystemId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'OperatingSystemUpdProc: Cannot update&nbsp&nbsp in OperatingSystem '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">OperatingSystemUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">OperatingSystemUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc236"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_CreateProvenance&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_CreateProvenance </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_CreateProvenance]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp (@ProvenanceName VARCHAR (100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceAdministrativeHistory VARCHAR (MAX),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceId INT OUTPUT)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[Provenance]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([ProvenanceName]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[ProvenanceAdministrativeHistory]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@ProvenanceName</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@ProvenanceAdministrativeHistory</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GetDate()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Cataloger')</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET @ProvenanceId = SCOPE_IDENTITY()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp COMMIT TRANSACTION</TT><BR><TT>END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_CreateProvenance Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_CreateProvenance Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc237"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_CreateProvenanceVariant&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_CreateProvenanceVariant </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_CreateProvenanceVariant]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantQualifier VARCHAR (25),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantName VARCHAR (100)&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[ProvenanceVariant]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([ProvenanceId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[ProvenanceVariantQualifierId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[ProvenanceVariantName]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@ProvenanceId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@ProvenanceVariantQualifier</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@ProvenanceVariantName</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GETDATE()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Cataloger')</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp COMMIT TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_CreateProvenanceVariant Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_CreateProvenanceVariant Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc238"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_CreateSeries&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_CreateSeries </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_CreateSeries]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp (@SeriesTitle VARCHAR (250),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesDescription VARCHAR (MAX),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesOpenDate VARCHAR(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesStartYear INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesEndYear INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesDateRangeDescription VARCHAR (100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesExtentDescription VARCHAR (1024),&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesArrangement VARCHAR (1024),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesRestrictionDescription VARCHAR (1024),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesGeneralNote VARCHAR (MAX),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesIdentifier VARCHAR (50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesActivity VARCHAR (50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesId INT OUTPUT)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN TRANSACTION&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[Series]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([SeriesTitle]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesDescription]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesOpenDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesStartYear]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesEndYear]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesDateRangeDescription]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesExtentDescription]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesArrangement]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesRestrictionDescription]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesGeneralNote]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesIdentifier]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesActivity]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[ProvenanceId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@SeriesTitle</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesDescription</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesOpenDate</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesStartYear</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesEndYear</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesDateRangeDescription</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesExtentDescription</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesArrangement</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesRestrictionDescription</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesGeneralNote</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesIdentifier</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesActivity</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@ProvenanceId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GETDATE()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Cataloger')</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET @SeriesId = SCOPE_IDENTITY()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp COMMIT TRANSACTION</TT><BR><TT>END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_CreateSeries Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_CreateSeries Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc239"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_CreateSeriesAcquisition&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_CreateSeriesAcquisition </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_CreateSeriesAcquisition]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp (@SeriesId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionReceivedDate DATETIME,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionIngestDate DATETIME,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionAccessionNumber VARCHAR (50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionTransferAuthority VARCHAR (50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionSource VARCHAR (100),&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionDirectory VARCHAR (255),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @AcqId INT OUTPUT)</TT><BR><TT></TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[SeriesAcquisition]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([SeriesId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionReceivedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionIngestDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionReadyToIngest]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionIngested]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionAccessionNumber]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionTransferAuthority]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionSource]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionDirectory]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesAcquisitionReceivedDate</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesAcquisitionIngestDate</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'False'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'False'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesAcquisitionAccessionNumber</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesAcquisitionTransferAuthority</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesAcquisitionSource</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesAcquisitionDirectory&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GETDATE()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Cataloger')</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET @AcqId = SCOPE_IDENTITY()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp COMMIT TRANSACTION</TT><BR><TT>END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_CreateSeriesAcquisition Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_CreateSeriesAcquisition Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc240"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_CreateSeriesKeyword&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_CreateSeriesKeyword </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_CreateSeriesKeyword]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp (@SeriesId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesKeyword VARCHAR (50))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[SeriesKeyword]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([SeriesId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesKeyword]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesKeyword</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GetDate()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Cataloger')</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp COMMIT TRANSACTION</TT><BR><TT>END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_CreateSeriesKeyword Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_CreateSeriesKeyword Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc241"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_CreateSeriesLocation&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_CreateSeriesLocation </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_CreateSeriesLocation]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp (@SeriesId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesGeoLocationValue VARCHAR (100))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[SeriesLocation]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([SeriesId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesGeoLocationValue]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesGeoLocationValue</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GetDate()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Cataloger')</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp COMMIT TRANSACTION</TT><BR><TT>END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_CreateSeriesLocation Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_CreateSeriesLocation Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc242"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_CreateSeriesSubject&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_CreateSeriesSubject </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_CreateSeriesSubject]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp (@SeriesId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesSubjectQualifier VARCHAR (25),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesSubjectName VARCHAR(100))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[SeriesSubject]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([SeriesId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesSubjectQualifier]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesSubjectName]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesSubjectQualifier</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesSubjectName</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GetDate()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Cataloger')</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp COMMIT TRANSACTION</TT><BR><TT>END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_CreateSeriesSubject Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_CreateSeriesSubject Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc243"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_DeleteProvenanceVariant&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_DeleteProvenanceVariant </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_DeleteProvenanceVariant] </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp -- Add the parameters for the stored procedure here</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantId INT</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp DELETE FROM ProvenanceVariant WHERE ProvenanceVariantId = @ProvenanceVariantId</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_DeleteProvenanceVariant Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_DeleteProvenanceVariant Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc244"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_DeleteSeriesKeyword&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_DeleteSeriesKeyword </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_DeleteSeriesKeyword] </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp -- Add the parameters for the stored procedure here</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesKeywordId INT</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp DELETE FROM SeriesKeyword WHERE SeriesKeywordId = @SeriesKeywordId</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_DeleteSeriesKeyword Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_DeleteSeriesKeyword Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc245"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_DeleteSeriesLocation&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_DeleteSeriesLocation </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_DeleteSeriesLocation] </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp -- Add the parameters for the stored procedure here</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesLocationId INT</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp DELETE FROM SeriesLocation WHERE SeriesLocationId = @SeriesLocationId</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_DeleteSeriesLocation Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_DeleteSeriesLocation Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc246"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_DeleteSeriesSubject&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_DeleteSeriesSubject </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_DeleteSeriesSubject] </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp -- Add the parameters for the stored procedure here</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesSubjectId INT</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp DELETE FROM SeriesSubject WHERE SeriesSubjectId = @SeriesSubjectId</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_DeleteSeriesSubject Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_DeleteSeriesSubject Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc247"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_GetItemCount&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_GetItemCount </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_GetItemCount]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @AcqId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ItemCount INT OUTPUT</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>SET NOCOUNT ON;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET @ItemCount = (SELECT COUNT(*) </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp FROM SeriesAcquisitionItem INNER JOIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp Item ON SeriesAcquisitionItem.ItemId = Item.ItemId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesAcquisitionItem.SeriesAcquisitionId = @AcqId)</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_GetItemCount Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_GetItemCount Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc248"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_GetItemsList&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_GetItemsList </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [dbo].[PAC_GetItemsList]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp (@AcqId int, </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ItemPull varchar(25),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ItemCount int)</TT><BR><TT>AS</TT><BR><TT></TT><BR><TT>IF @ItemPull = 'no' </TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SELECT TOP (@ItemCount) ItemId, ItemTitle FROM Item ORDER BY NEWID()</TT><BR><TT>END</TT><BR><TT>ELSE</TT><BR><TT>IF @ItemPull = 'rnd'</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp DECLARE @i INT</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET @i = (@ItemCount * 0.10)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SELECT TOP (@i) ItemId, ItemTitle FROM Item ORDER BY NEWID()</TT><BR><TT>END</TT><BR><TT>ELSE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SELECT ItemId, ItemTitle FROM Item ORDER BY ItemTitle</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_GetItemsList Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_GetItemsList Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc249"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_GetProvenanceNamesAndVariants&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_GetProvenanceNamesAndVariants </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_GetProvenanceNamesAndVariants]</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SELECT&nbsp&nbsp&nbsp&nbsp&nbsp ProvenanceId, ProvenanceName AS Name</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp dbo.Provenance</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp UNION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SELECT&nbsp&nbsp&nbsp&nbsp&nbsp TOP (100) PERCENT ProvenanceId, ProvenanceVariantName AS Name</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp dbo.ProvenanceVariant</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ORDER BY Name</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_GetProvenanceNamesAndVariants Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_GetProvenanceNamesAndVariants Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc250"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_GetProvenances&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_GetProvenances </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_GetProvenances]</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SELECT * FROM Provenance ORDER BY ProvenanceName </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_GetProvenances Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_GetProvenances Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc251"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_GetSeries&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_GetSeries </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [dbo].[PAC_GetSeries]</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp -- SET NOCOUNT ON added to prevent extra result sets from</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp -- interfering with SELECT statements.</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SELECT&nbsp&nbsp&nbsp&nbsp&nbsp TOP (100) PERCENT [PeDALS_DLB].[dbo].[Series].[SeriesTitle], [PeDALS_DLB].[dbo].[Series].[SeriesId], [PeDALS_DLB].[dbo].[Provenance].[ProvenanceName]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp FROM&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Provenance] RIGHT OUTER JOIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series] ON [PeDALS_DLB].[dbo].[Provenance].[ProvenanceId] = [PeDALS_DLB].[dbo].[Series].[ProvenanceId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp ORDER BY [PeDALS_DLB].[dbo].[Provenance].[ProvenanceName], [PeDALS_DLB].[dbo].[Series].[SeriesTitle]</TT><BR><TT>END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_GetSeries Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_GetSeries Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc252"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_GetSeriesAcquisitions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_GetSeriesAcquisitions </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [dbo].[PAC_GetSeriesAcquisitions]</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp -- SET NOCOUNT ON added to prevent extra result sets from</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp -- interfering with SELECT statements.</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SELECT&nbsp&nbsp&nbsp&nbsp&nbsp TOP (100) PERCENT [PeDALS_DLB].[dbo].[Provenance].[ProvenanceName], [PeDALS_DLB].[dbo].[Series].[SeriesTitle], CONVERT(VARCHAR,[PeDALS_DLB].[dbo].[SeriesAcquisition].[SeriesAcquisitionIngestDate],101) AS SeriesAcquisitionIngestDate, CONVERT(VARCHAR,[PeDALS_DLB].[dbo].[SeriesAcquisition].[SeriesAcquisitionReceivedDate],101) AS SeriesAcquisitionReceivedDate, </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[SeriesAcquisition].[SeriesAcquisitionId], [PeDALS_DLB].[dbo].[SeriesAcquisition].[SeriesAcquisitionAccessionNumber]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Provenance] INNER JOIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series] ON [PeDALS_DLB].[dbo].[Provenance].[ProvenanceId] = [PeDALS_DLB].[dbo].[Series].[ProvenanceId] INNER JOIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[SeriesAcquisition] ON [PeDALS_DLB].[dbo].[Series].[SeriesId] = [PeDALS_DLB].[dbo].[SeriesAcquisition].[SeriesId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ORDER BY [PeDALS_DLB].[dbo].[Provenance].[ProvenanceName]</TT><BR><TT>END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_GetSeriesAcquisitions Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_GetSeriesAcquisitions Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc253"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_UpdateProvenance&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_UpdateProvenance </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_UpdateProvenance]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceName VARCHAR (100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceAdministrativeHistory VARCHAR (MAX)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp UPDATE [PeDALS_DLB].[dbo].[Provenance]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET [PeDALS_DLB].[dbo].[Provenance].[ProvenanceName] = @ProvenanceName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Provenance].[ProvenanceAdministrativeHistory] = @ProvenanceAdministrativeHistory,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Provenance].[ModifiedDate] = GetDate(),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Provenance].[ModifiedBy] = 'Cataloger'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE [PeDALS_DLB].[dbo].[Provenance].[ProvenanceId] = @ProvenanceId&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp COMMIT TRANSACTION</TT><BR><TT>END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_UpdateProvenance Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_UpdateProvenance Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc254"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_UpdateProvenanceVariant&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_UpdateProvenanceVariant </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_UpdateProvenanceVariant]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantQualifierId VARCHAR (25),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantName VARCHAR (100)&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN TRANSACTION</TT><BR><TT>IF @ProvenanceVariantId is null</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[ProvenanceVariant]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([ProvenanceId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[ProvenanceVariantQualifierId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[ProvenanceVariantName]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@ProvenanceId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@ProvenanceVariantQualifierId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@ProvenanceVariantName</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GETDATE()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Cataloger')</TT><BR><TT>ELSE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp UPDATE ProvenanceVariant</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET&nbsp&nbsp&nbsp&nbsp&nbsp ProvenanceVariantQualifierId = @ProvenanceVariantQualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ProvenanceVariantName = @ProvenanceVariantName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate = GetDate(),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy = 'Cataloger'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE (ProvenanceVariantId = @ProvenanceVariantId)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp COMMIT TRANSACTION</TT><BR><TT>END TRY</TT><BR><TT></TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_UpdateProvenanceVariant Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_UpdateProvenanceVariant Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc255"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_UpdateSeries&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_UpdateSeries </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_UpdateSeries]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesId int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesTitle varchar(250),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesDescription varchar(max),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesOpenDate varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesStartYear int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesEndYear int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesDateRangeDescription varchar(100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesExtentDescription varchar(1024),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesArrangement varchar(1024),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesRestrictionDescription varchar(1024),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesGeneralNote varchar(max),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesIdentifier varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesActivity varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceId int</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp UPDATE [PeDALS_DLB].[dbo].[Series]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET [PeDALS_DLB].[dbo].[Series].[SeriesTitle] = @SeriesTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series].[SeriesDescription] = @SeriesDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series].[SeriesOpenDate] = @SeriesOpenDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series].[SeriesStartYear] = @SeriesStartYear,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series].[SeriesEndYear] = @SeriesEndYear,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series].[SeriesDateRangeDescription] = @SeriesDateRangeDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series].[SeriesExtentDescription] = @SeriesExtentDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series].[SeriesArrangement] = @SeriesArrangement,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series].[SeriesRestrictionDescription] = @SeriesRestrictionDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series].[SeriesGeneralNote] = @SeriesGeneralNote,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series].[SeriesIdentifier] = @SeriesIdentifier,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series].[SeriesActivity] = @SeriesActivity,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series].[ProvenanceId] = @ProvenanceId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series].[ModifiedDate] = GetDate(),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series].[ModifiedBy] = 'Cataloger'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE [PeDALS_DLB].[dbo].[Series].[SeriesId] = @SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[Series].[ProvenanceId] = @ProvenanceId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp COMMIT TRANSACTION</TT><BR><TT>END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_UpdateSeries Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_UpdateSeries Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc256"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_UpdateSeriesAcquisition&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_UpdateSeriesAcquisition </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_UpdateSeriesAcquisition]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp (@SeriesAcquisitionId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionReceivedDate DATETIME,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionIngestDate DATETIME,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionAccessionNumber VARCHAR (50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionTransferAuthority VARCHAR (50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionSource VARCHAR (100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionDirectory VARCHAR (255))</TT><BR><TT></TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp UPDATE [PeDALS_DLB].[dbo].[SeriesAcquisition]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET [SeriesAcquisitionReceivedDate] = @SeriesAcquisitionReceivedDate</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionIngestDate] = @SeriesAcquisitionIngestDate</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionAccessionNumber] = @SeriesAcquisitionAccessionNumber</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionTransferAuthority] = @SeriesAcquisitionTransferAuthority</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionSource] = @SeriesAcquisitionSource</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesAcquisitionDirectory] = @SeriesAcquisitionDirectory</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[ModifiedDate] = GETDATE()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[ModifiedBy] = 'Cataloger'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE [SeriesAcquisitionId] = @SeriesAcquisitionId&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp COMMIT TRANSACTION</TT><BR><TT>END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_UpdateSeriesAcquisition Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_UpdateSeriesAcquisition Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc257"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_UpdateSeriesKeyword&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_UpdateSeriesKeyword </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_UpdateSeriesKeyword]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesKeywordId int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesId int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesKeyword varchar(50)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN TRANSACTION</TT><BR><TT>IF @SeriesKeywordId is null</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[SeriesKeyword]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([SeriesId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesKeyword]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesKeyword</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GETDATE()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Cataloger')</TT><BR><TT>ELSE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp UPDATE [PeDALS_DLB].[dbo].[SeriesKeyword]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET [PeDALS_DLB].[dbo].[SeriesKeyword].[SeriesKeyword] = @SeriesKeyword,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[SeriesKeyword].[ModifiedDate] = GetDate(),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[SeriesKeyword].[ModifiedBy] = 'Cataloger'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE [PeDALS_DLB].[dbo].[SeriesKeyword].[SeriesKeywordId] = @SeriesKeywordId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp COMMIT TRANSACTION</TT><BR><TT>END TRY</TT><BR><TT></TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_UpdateSeriesKeyword Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_UpdateSeriesKeyword Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc258"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_UpdateSeriesLocation&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_UpdateSeriesLocation </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_UpdateSeriesLocation]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesLocationId int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesId int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesGeoLocationValue varchar(100)</TT><BR><TT></TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN TRANSACTION</TT><BR><TT>IF @SeriesLocationId is null</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[SeriesLocation]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([SeriesId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesGeoLocationValue]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesGeoLocationValue</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GETDATE()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Cataloger')</TT><BR><TT>ELSE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp UPDATE [PeDALS_DLB].[dbo].[SeriesLocation]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET [PeDALS_DLB].[dbo].[SeriesLocation].[SeriesGeoLocationValue] = @SeriesGeoLocationValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[SeriesLocation].[ModifiedDate] = GetDate(),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[SeriesLocation].[ModifiedBy] = 'Cataloger'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE [PeDALS_DLB].[dbo].[SeriesLocation].[SeriesLocationId] = @SeriesLocationId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp COMMIT TRANSACTION</TT><BR><TT>END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_UpdateSeriesLocation Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_UpdateSeriesLocation Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc259"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">PAC_UpdateSeriesSubject&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: PAC_UpdateSeriesSubject </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [PAC_UpdateSeriesSubject]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesSubjectId int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesId int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesSubjectQualifier varchar(25),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesSubjectName varchar(100)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp TRY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET NOCOUNT ON</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN TRANSACTION</TT><BR><TT>IF @SeriesSubjectId is null</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PeDALS_DLB].[dbo].[SeriesSubject]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ([SeriesId]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesSubjectQualifier]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[SeriesSubjectName]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedDate]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,[CreatedBy])</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp VALUES</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesSubjectQualifier</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,@SeriesSubjectName</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,GETDATE()</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ,'Cataloger')</TT><BR><TT>ELSE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp UPDATE [PeDALS_DLB].[dbo].[SeriesSubject]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET [PeDALS_DLB].[dbo].[SeriesSubject].[SeriesSubjectQualifier] = @SeriesSubjectQualifier,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[SeriesSubject].[SeriesSubjectName] = @SeriesSubjectName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[SeriesSubject].[ModifiedDate] = GetDate(),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [PeDALS_DLB].[dbo].[SeriesSubject].[ModifiedBy] = 'Cataloger'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE [PeDALS_DLB].[dbo].[SeriesSubject].[SeriesSubjectId] = @SeriesSubjectId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp COMMIT TRANSACTION</TT><BR><TT>END TRY</TT><BR><TT>BEGIN CATCH</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRANSACTION</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp PRINT 'An error occurred.&nbsp&nbsp Please notify your administrator to check the error database.'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO [PEDALS_PAC_ERRORS].[dbo].[PAC_ERROR](ErrorNumber, ErrorMessage, CreatedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES (ERROR_NUMBER(), ERROR_MESSAGE(), GETDATE())</TT><BR><TT>END CATCH</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_UpdateSeriesSubject Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">PAC_UpdateSeriesSubject Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc260"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">pdl_GetInitialValues&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: pdl_GetInitialValues </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE [pdl_GetInitialValues] </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesId INT,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionId INT</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp DECLARE @temp TABLE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemId INT</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp )</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp INSERT INTO @temp</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SELECT ISNULL(MAX(ItemId), 0) FROM Item WHERE SeriesId = @SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SELECT</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp P.ProvenanceName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp S.SeriesTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp S.SeriesIdentifier,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SA.SeriesAcquisitionSource,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SA.SeriesAcquisitionDirectory,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SA.SeriesAcquisitionAccessionNumber,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SA.SeriesAcquisitionIngestDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SA.SeriesAcquisitionReceivedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp I.ItemId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp FROM </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp dbo.Provenance P,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp dbo.Series S,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp dbo.SeriesAcquisition SA,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @temp I</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp P.ProvenanceId = @ProvenanceId AND</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp S.SeriesId = @SeriesId AND</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SA.SeriesAcquisitionId = @SeriesAcquisitionId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp FOR XML AUTO--, XMLDATA</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">pdl_GetInitialValues Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">pdl_GetInitialValues Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc261"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">pdl_ReadyToIngest&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: pdl_ReadyToIngest </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE Procedure [pdl_ReadyToIngest]</TT><BR><TT>AS</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SELECT Top 1 SeriesAcquisitionId, SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp INTO #TempAcquisitionSeries</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM SeriesAcquisition</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp WHERE&nbsp&nbsp SeriesAcquisitionReadyToIngest = 'True'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionIngested = 'False'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp UPDATE SeriesAcquisition</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SET SeriesAcquisitionIngested = 'True'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesAcquisitionId = (SELECT SeriesAcquisitionId FROM #TempAcquisitionSeries)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp SELECT SeriesAcquisitionId, SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp FROM #TempAcquisitionSeries</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp FOR XML AUTO--, XMLDATA</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp DROP TABLE #TempAcquisitionSeries</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">pdl_ReadyToIngest Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">pdl_ReadyToIngest Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc262"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ProvenanceDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ProvenanceDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ProvenanceDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Provenance</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ProvenanceId = @ProvenanceId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'ProvenanceDelProc: Cannot delete because foreign keys still exist in Provenance '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc263"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ProvenanceInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ProvenanceInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ProvenanceInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceAdministrativeHistory&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO Provenance(ProvenanceName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ProvenanceAdministrativeHistory,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@ProvenanceName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceAdministrativeHistory,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'ProvenanceInsProc: Cannot insert because primary key value not found in Provenance '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc264"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ProvenanceSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ProvenanceSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ProvenanceSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT ProvenanceId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ProvenanceName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ProvenanceAdministrativeHistory,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Provenance</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ProvenanceId = @ProvenanceId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc265"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ProvenanceUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ProvenanceUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ProvenanceUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceAdministrativeHistory&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE Provenance</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET ProvenanceName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ProvenanceName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ProvenanceAdministrativeHistory&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ProvenanceAdministrativeHistory,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ProvenanceId = @ProvenanceId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'ProvenanceUpdProc: Cannot update&nbsp&nbsp in Provenance '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc266"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ProvenanceVariantDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ProvenanceVariantDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ProvenanceVariantDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantQualifierId&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ProvenanceVariant</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ProvenanceId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ProvenanceId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND ProvenanceVariantQualifierId = @ProvenanceVariantQualifierId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND ProvenanceVariantName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ProvenanceVariantName</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'ProvenanceVariantDelProc: Cannot delete because foreign keys still exist in ProvenanceVariant '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceVariantDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceVariantDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc267"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ProvenanceVariantInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ProvenanceVariantInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ProvenanceVariantInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantQualifierId&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO ProvenanceVariant(ProvenanceId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ProvenanceVariantQualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ProvenanceVariantName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@ProvenanceId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantQualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'ProvenanceVariantInsProc: Cannot insert because primary key value not found in ProvenanceVariant '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceVariantInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceVariantInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc268"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ProvenanceVariantSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ProvenanceVariantSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ProvenanceVariantSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantQualifierId&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT ProvenanceVariantId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ProvenanceId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ProvenanceVariantQualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ProvenanceVariantName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM ProvenanceVariant</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ProvenanceId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ProvenanceId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND ProvenanceVariantQualifierId = @ProvenanceVariantQualifierId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND ProvenanceVariantName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ProvenanceVariantName</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceVariantSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceVariantSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc269"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">ProvenanceVariantUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: ProvenanceVariantUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE ProvenanceVariantUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantQualifierId&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceVariantName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE ProvenanceVariant</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ProvenanceId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ProvenanceId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND ProvenanceVariantQualifierId = @ProvenanceVariantQualifierId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND ProvenanceVariantName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ProvenanceVariantName</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'ProvenanceVariantUpdProc: Cannot update&nbsp&nbsp in ProvenanceVariant '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceVariantUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">ProvenanceVariantUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc270"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">QualifierDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: QualifierDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE QualifierDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @QualifierId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Qualifier</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE QualifierId = @QualifierId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'QualifierDelProc: Cannot delete because foreign keys still exist in Qualifier '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">QualifierDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">QualifierDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc271"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">QualifierInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: QualifierInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE QualifierInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @QualifierType&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @QualifierName&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO Qualifier(QualifierType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@QualifierType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @QualifierName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'QualifierInsProc: Cannot insert because primary key value not found in Qualifier '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">QualifierInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">QualifierInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc272"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">QualifierSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: QualifierSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE QualifierSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @QualifierId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Qualifier</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE QualifierId = @QualifierId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">QualifierSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">QualifierSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc273"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">QualifierUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: QualifierUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE QualifierUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @QualifierId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @QualifierType&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @QualifierName&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE Qualifier</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET QualifierType&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @QualifierType,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @QualifierName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE QualifierId = @QualifierId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'QualifierUpdProc: Cannot update&nbsp&nbsp in Qualifier '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">QualifierUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">QualifierUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc274"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">RelatedItemDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: RelatedItemDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE RelatedItemDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @RelatedItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @RelatedItemTypeId&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM RelatedItem</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND RelatedItemId&nbsp&nbsp&nbsp&nbsp&nbsp = @RelatedItemId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND RelatedItemTypeId = @RelatedItemTypeId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'RelatedItemDelProc: Cannot delete because foreign keys still exist in RelatedItem '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc275"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">RelatedItemInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: RelatedItemInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE RelatedItemInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @RelatedItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @RelatedItemTypeId&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO RelatedItem(ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RelatedItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RelatedItemTypeId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @RelatedItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @RelatedItemTypeId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'RelatedItemInsProc: Cannot insert because primary key value not found in RelatedItem '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc276"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">RelatedItemSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: RelatedItemSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE RelatedItemSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @RelatedItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @RelatedItemTypeId&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RelatedItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RelatedItemTypeId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM RelatedItem</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND RelatedItemId&nbsp&nbsp&nbsp&nbsp&nbsp = @RelatedItemId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND RelatedItemTypeId = @RelatedItemTypeId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc277"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">RelatedItemTypeDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: RelatedItemTypeDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE RelatedItemTypeDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @RelatedItemTypeId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM RelatedItemType</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE RelatedItemTypeId = @RelatedItemTypeId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'RelatedItemTypeDelProc: Cannot delete because foreign keys still exist in RelatedItemType '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemTypeDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemTypeDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc278"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">RelatedItemTypeInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: RelatedItemTypeInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE RelatedItemTypeInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @RelatedItemTypeName&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO RelatedItemType(RelatedItemTypeName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@RelatedItemTypeName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'RelatedItemTypeInsProc: Cannot insert because primary key value not found in RelatedItemType '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemTypeInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemTypeInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc279"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">RelatedItemTypeSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: RelatedItemTypeSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE RelatedItemTypeSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @RelatedItemTypeId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT RelatedItemTypeId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RelatedItemTypeName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM RelatedItemType</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE RelatedItemTypeId = @RelatedItemTypeId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemTypeSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemTypeSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc280"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">RelatedItemTypeUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: RelatedItemTypeUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE RelatedItemTypeUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @RelatedItemTypeId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @RelatedItemTypeName&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE RelatedItemType</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET RelatedItemTypeName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @RelatedItemTypeName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE RelatedItemTypeId = @RelatedItemTypeId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'RelatedItemTypeUpdProc: Cannot update&nbsp&nbsp in RelatedItemType '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemTypeUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemTypeUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc281"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">RelatedItemUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: RelatedItemUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE RelatedItemUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @RelatedItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @RelatedItemTypeId&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE RelatedItem</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND RelatedItemId&nbsp&nbsp&nbsp&nbsp&nbsp = @RelatedItemId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND RelatedItemTypeId = @RelatedItemTypeId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'RelatedItemUpdProc: Cannot update&nbsp&nbsp in RelatedItem '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">RelatedItemUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc282"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesAcquisitionDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesAcquisitionDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesAcquisitionDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM SeriesAcquisition</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesAcquisitionId = @SeriesAcquisitionId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'SeriesAcquisitionDelProc: Cannot delete because foreign keys still exist in SeriesAcquisition '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc283"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesAcquisitionInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesAcquisitionInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesAcquisitionInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionIngestDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionReadyToIngest&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp bit,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionIngested&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp bit,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionAccessionNumber&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionTransferAuthority&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionSource&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionDirectory&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(255)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionReceivedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO SeriesAcquisition(SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionIngestDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionReadyToIngest,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionIngested,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionAccessionNumber,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionTransferAuthority,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionSource,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionDirectory,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionReceivedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionIngestDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionReadyToIngest,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionIngested,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionAccessionNumber,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionTransferAuthority,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionSource,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionDirectory,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionReceivedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'SeriesAcquisitionInsProc: Cannot insert because primary key value not found in SeriesAcquisition '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc284"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesAcquisitionItemDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesAcquisitionItemDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesAcquisitionItemDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM SeriesAcquisitionItem</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesId = @SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND ItemId&nbsp&nbsp&nbsp = @ItemId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'SeriesAcquisitionItemDelProc: Cannot delete because foreign keys still exist in SeriesAcquisitionItem '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionItemDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionItemDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc285"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesAcquisitionItemInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesAcquisitionItemInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesAcquisitionItemInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionId&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO SeriesAcquisitionItem(SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'SeriesAcquisitionItemInsProc: Cannot insert because primary key value not found in SeriesAcquisitionItem '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionItemInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionItemInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc286"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesAcquisitionItemSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesAcquisitionItemSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesAcquisitionItemSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM SeriesAcquisitionItem</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesId = @SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND ItemId&nbsp&nbsp&nbsp = @ItemId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionItemSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionItemSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc287"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesAcquisitionItemUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesAcquisitionItemUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesAcquisitionItemUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionId&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE SeriesAcquisitionItem</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET SeriesAcquisitionId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesAcquisitionId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesId = @SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND ItemId&nbsp&nbsp&nbsp = @ItemId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'SeriesAcquisitionItemUpdProc: Cannot update&nbsp&nbsp in SeriesAcquisitionItem '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionItemUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionItemUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc288"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesAcquisitionSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesAcquisitionSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesAcquisitionSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT SeriesAcquisitionId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionIngestDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionReadyToIngest,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionIngested,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionAccessionNumber,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionTransferAuthority,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionSource,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionDirectory,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionReceivedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM SeriesAcquisition</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesAcquisitionId = @SeriesAcquisitionId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc289"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesAcquisitionUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesAcquisitionUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesAcquisitionUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionIngestDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionReadyToIngest&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp bit,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionIngested&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp bit,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionAccessionNumber&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionTransferAuthority&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionSource&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionDirectory&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(255)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesAcquisitionReceivedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE SeriesAcquisition</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionIngestDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesAcquisitionIngestDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionReadyToIngest&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesAcquisitionReadyToIngest,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionIngested&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesAcquisitionIngested,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionAccessionNumber&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesAcquisitionAccessionNumber,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionTransferAuthority&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesAcquisitionTransferAuthority,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionSource&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesAcquisitionSource,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionDirectory&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesAcquisitionDirectory,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesAcquisitionReceivedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesAcquisitionReceivedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesAcquisitionId = @SeriesAcquisitionId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'SeriesAcquisitionUpdProc: Cannot update&nbsp&nbsp in SeriesAcquisition '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesAcquisitionUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc290"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Series</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesId = @SeriesId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'SeriesDelProc: Cannot delete because foreign keys still exist in Series '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc291"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesTitle&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesOpenDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesStartYear&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesEndYear&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesDateRangeDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesExtentDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1024)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesArrangement&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1024)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesRestrictionDescription&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1024)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesGeneralNote&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesIdentifier&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesActivity&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO Series(SeriesTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesOpenDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesStartYear,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesEndYear,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesDateRangeDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesExtentDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesArrangement,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesRestrictionDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesGeneralNote,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesIdentifier,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesActivity,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ProvenanceId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@SeriesTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesOpenDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesStartYear,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesEndYear,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesDateRangeDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesExtentDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesArrangement,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesRestrictionDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesGeneralNote,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesIdentifier,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesActivity,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ProvenanceId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'SeriesInsProc: Cannot insert because primary key value not found in Series '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc292"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesKeywordDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesKeywordDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesKeywordDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesKeyword&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM SeriesKeyword</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND SeriesKeyword = @SeriesKeyword</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'SeriesKeywordDelProc: Cannot delete because foreign keys still exist in SeriesKeyword '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesKeywordDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesKeywordDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc293"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesKeywordInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesKeywordInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesKeywordInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesKeyword&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO SeriesKeyword(SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesKeyword,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp )</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesKeyword,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp )</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'SeriesKeywordInsProc: Cannot insert because primary key value not found in SeriesKeyword '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesKeywordInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesKeywordInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc294"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesKeywordSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesKeywordSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesKeywordSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesKeyword&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesKeyword,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesKeywordId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM SeriesKeyword</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND SeriesKeyword = @SeriesKeyword</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesKeywordSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesKeywordSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc295"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesKeywordUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesKeywordUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesKeywordUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesKeyword&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesKeywordId&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE SeriesKeyword</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND SeriesKeyword = @SeriesKeyword</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'SeriesKeywordUpdProc: Cannot update&nbsp&nbsp in SeriesKeyword '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesKeywordUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesKeywordUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc296"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesLocationDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesLocationDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesLocationDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesGeoLocationValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM SeriesLocation</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND SeriesGeoLocationValue = @SeriesGeoLocationValue</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'SeriesLocationDelProc: Cannot delete because foreign keys still exist in SeriesLocation '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesLocationDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesLocationDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc297"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesLocationInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesLocationInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesLocationInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesGeoLocationValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO SeriesLocation(SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesGeoLocationValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp )</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesGeoLocationValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp )</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'SeriesLocationInsProc: Cannot insert because primary key value not found in SeriesLocation '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesLocationInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesLocationInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc298"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesLocationSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesLocationSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesLocationSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesGeoLocationValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesGeoLocationValue,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesLocationId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM SeriesLocation</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND SeriesGeoLocationValue = @SeriesGeoLocationValue</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesLocationSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesLocationSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc299"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesLocationUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesLocationUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesLocationUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesGeoLocationValue&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesLocationId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE SeriesLocation</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp AND SeriesGeoLocationValue = @SeriesGeoLocationValue</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'SeriesLocationUpdProc: Cannot update&nbsp&nbsp in SeriesLocation '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesLocationUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesLocationUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc300"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesOpenDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesStartYear,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesEndYear,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesDateRangeDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesExtentDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesArrangement,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesRestrictionDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesGeneralNote,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesIdentifier,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesActivity,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ProvenanceId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Series</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesId = @SeriesId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc301"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SeriesUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SeriesUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SeriesUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesTitle&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(250),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesOpenDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesStartYear&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesEndYear&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesDateRangeDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesExtentDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1024)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesArrangement&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1024)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesRestrictionDescription&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1024)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesGeneralNote&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesIdentifier&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesActivity&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ProvenanceId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE Series</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET SeriesTitle&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesTitle,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesOpenDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesOpenDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesStartYear&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesStartYear,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesEndYear&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesEndYear,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesDateRangeDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesDateRangeDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesExtentDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesExtentDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesArrangement&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesArrangement,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesRestrictionDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesRestrictionDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesGeneralNote&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesGeneralNote,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesIdentifier&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesIdentifier,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesActivity&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesActivity,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ProvenanceId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ProvenanceId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesId = @SeriesId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'SeriesUpdProc: Cannot update&nbsp&nbsp in Series '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SeriesUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc302"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SoftwareDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SoftwareDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SoftwareDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Software</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SoftwareId = @SoftwareId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'SoftwareDelProc: Cannot delete because foreign keys still exist in Software '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SoftwareDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SoftwareDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc303"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SoftwareInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SoftwareInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SoftwareInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareVersion&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(20)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareDependencyDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwarePurposeDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareCharacteristicDescription&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareLocation&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareNote&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO Software(SoftwareName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareVersion,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareDependencyDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwarePurposeDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareCharacteristicDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareLocation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareNote,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@SoftwareName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SoftwareVersion,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SoftwareDependencyDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SoftwarePurposeDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SoftwareCharacteristicDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SoftwareLocation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SoftwareNote,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'SoftwareInsProc: Cannot insert because primary key value not found in Software '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SoftwareInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SoftwareInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc304"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SoftwareSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SoftwareSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SoftwareSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT SoftwareId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareVersion,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareDependencyDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwarePurposeDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareCharacteristicDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareLocation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareNote,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Software</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SoftwareId = @SoftwareId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SoftwareSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SoftwareSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc305"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SoftwareUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SoftwareUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SoftwareUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareVersion&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(20)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareDependencyDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwarePurposeDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareCharacteristicDescription&nbsp&nbsp&nbsp&nbsp&nbsp varchar(1250)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareLocation&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SoftwareNote&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE Software</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET SoftwareName&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SoftwareName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareVersion&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SoftwareVersion,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareDependencyDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SoftwareDependencyDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwarePurposeDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SoftwarePurposeDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareCharacteristicDescription&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SoftwareCharacteristicDescription,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareLocation&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SoftwareLocation,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SoftwareNote&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SoftwareNote,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SoftwareId = @SoftwareId</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'SoftwareUpdProc: Cannot update&nbsp&nbsp in Software '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SoftwareUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SoftwareUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc306"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">sp_alterdiagram&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: sp_alterdiagram </TT><BR><TT> */</TT><BR><TT></TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp CREATE PROCEDURE sp_alterdiagram</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp (</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @diagramname&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp sysname,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @owner_id&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp = null,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @version&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @definition&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varbinary(max)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp )</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WITH EXECUTE AS 'dbo'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp AS</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp set nocount on</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @theId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @retval&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @IsDbo&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @UIDFound&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @DiagId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @ShouldChangeUID&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@diagramname is null)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR ('Invalid ARG', 16, 1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return -1</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp execute as caller;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @theId = DATABASE_PRINCIPAL_ID();&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @IsDbo = IS_MEMBER(N'db_owner'); </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@owner_id is null)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @owner_id = @theId;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp revert;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @ShouldChangeUID = 0</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @DiagId = diagram_id, @UIDFound = principal_id from dbo.sysdiagrams where principal_id = @owner_id and name = @diagramname </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@DiagId IS NULL or (@IsDbo = 0 and @theId <> @UIDFound))</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR ('Diagram does not exist or you do not have permission.', 16, 1);</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return -3</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@IsDbo <> 0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@UIDFound is null or USER_NAME(@UIDFound) is null) -- invalid principal_id</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @ShouldChangeUID = 1 ;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp -- update dds data&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp update dbo.sysdiagrams set definition = @definition where diagram_id = @DiagId ;</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp -- change owner</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@ShouldChangeUID = 1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp update dbo.sysdiagrams set principal_id = @theId where diagram_id = @DiagId ;</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp -- update dds version</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@version is not null)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp update dbo.sysdiagrams set version = @version where diagram_id = @DiagId ;</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return 0</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sp_alterdiagram Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sp_alterdiagram Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc307"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">sp_creatediagram&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: sp_creatediagram </TT><BR><TT> */</TT><BR><TT></TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp CREATE PROCEDURE sp_creatediagram</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp (</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @diagramname&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp sysname,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @owner_id&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp = null,&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @version&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @definition&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varbinary(max)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp )</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WITH EXECUTE AS 'dbo'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp AS</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp set nocount on</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @theId int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @retval int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @IsDbo&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @userName sysname</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@version is null or @diagramname is null)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR (N'E_INVALIDARG', 16, 1);</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return -1</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp execute as caller;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @theId = DATABASE_PRINCIPAL_ID(); </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @IsDbo = IS_MEMBER(N'db_owner');</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp revert; </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if @owner_id is null</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @owner_id = @theId;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp else</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if @theId <> @owner_id</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if @IsDbo = 0</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR (N'E_INVALIDARG', 16, 1);</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return -1</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @theId = @owner_id</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp -- next 2 line only for test, will be removed after define name unique</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if EXISTS(select diagram_id from dbo.sysdiagrams where principal_id = @theId and name = @diagramname)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR ('The name is already used.', 16, 1);</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return -2</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp insert into dbo.sysdiagrams(name, principal_id , version, definition)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp VALUES(@diagramname, @theId, @version, @definition) ;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @retval = @@IDENTITY </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return @retval</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sp_creatediagram Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sp_creatediagram Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc308"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">sp_dropdiagram&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: sp_dropdiagram </TT><BR><TT> */</TT><BR><TT></TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp CREATE PROCEDURE sp_dropdiagram</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp (</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @diagramname&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp sysname,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @owner_id&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp = null</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp )</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WITH EXECUTE AS 'dbo'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp AS</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp set nocount on</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @theId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @IsDbo&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @UIDFound&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @DiagId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@diagramname is null)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR ('Invalid value', 16, 1);</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return -1</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp EXECUTE AS CALLER;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @theId = DATABASE_PRINCIPAL_ID();</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @IsDbo = IS_MEMBER(N'db_owner'); </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@owner_id is null)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @owner_id = @theId;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp REVERT; </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @DiagId = diagram_id, @UIDFound = principal_id from dbo.sysdiagrams where principal_id = @owner_id and name = @diagramname </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@DiagId IS NULL or (@IsDbo = 0 and @UIDFound <> @theId))</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR ('Diagram does not exist or you do not have permission.', 16, 1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return -3</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp delete from dbo.sysdiagrams where diagram_id = @DiagId;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return 0;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sp_dropdiagram Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sp_dropdiagram Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc309"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">sp_helpdiagramdefinition&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: sp_helpdiagramdefinition </TT><BR><TT> */</TT><BR><TT></TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp CREATE PROCEDURE sp_helpdiagramdefinition</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp (</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @diagramname&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp sysname,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @owner_id&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp = null&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp )</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WITH EXECUTE AS N'dbo'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp AS</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp set nocount on</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @theId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @IsDbo&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @DiagId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @UIDFound&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@diagramname is null)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR (N'E_INVALIDARG', 16, 1);</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return -1</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp execute as caller;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @theId = DATABASE_PRINCIPAL_ID();</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @IsDbo = IS_MEMBER(N'db_owner');</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@owner_id is null)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @owner_id = @theId;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp revert; </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @DiagId = diagram_id, @UIDFound = principal_id from dbo.sysdiagrams where principal_id = @owner_id and name = @diagramname;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@DiagId IS NULL or (@IsDbo = 0 and @UIDFound <> @theId ))</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR ('Diagram does not exist or you do not have permission.', 16, 1);</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return -3</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select version, definition FROM dbo.sysdiagrams where diagram_id = @DiagId ; </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return 0</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sp_helpdiagramdefinition Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sp_helpdiagramdefinition Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc310"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">sp_helpdiagrams&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: sp_helpdiagrams </TT><BR><TT> */</TT><BR><TT></TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp CREATE PROCEDURE sp_helpdiagrams</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp (</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @diagramname sysname = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @owner_id int = NULL</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp )</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WITH EXECUTE AS N'dbo'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp AS</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DECLARE @user sysname</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DECLARE @dboLogin bit</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp EXECUTE AS CALLER;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET @user = USER_NAME();</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET @dboLogin = CONVERT(bit,IS_MEMBER('db_owner'));</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp REVERT;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SELECT</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [Database] = DB_NAME(),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [Name] = name,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [ID] = diagram_id,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [Owner] = USER_NAME(principal_id),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [OwnerID] = principal_id</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp sysdiagrams</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp WHERE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@dboLogin = 1 OR USER_NAME(principal_id) = @user) AND</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@diagramname IS NULL OR name = @diagramname) AND</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (@owner_id IS NULL OR principal_id = @owner_id)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ORDER BY</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp 4, 5, 1</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sp_helpdiagrams Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sp_helpdiagrams Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc311"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">sp_renamediagram&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: sp_renamediagram </TT><BR><TT> */</TT><BR><TT></TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp CREATE PROCEDURE sp_renamediagram</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp (</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @diagramname&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp sysname,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @owner_id&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp = null,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @new_diagramname&nbsp&nbsp&nbsp&nbsp&nbsp sysname</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp )</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WITH EXECUTE AS 'dbo'</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp AS</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp set nocount on</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @theId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @IsDbo&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @UIDFound&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @DiagId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @DiagIdTarg&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp declare @u_name&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp sysname</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if((@diagramname is null) or (@new_diagramname is null))</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR ('Invalid value', 16, 1);</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return -1</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp EXECUTE AS CALLER;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @theId = DATABASE_PRINCIPAL_ID();</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @IsDbo = IS_MEMBER(N'db_owner'); </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@owner_id is null)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @owner_id = @theId;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp REVERT;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @u_name = USER_NAME(@owner_id)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @DiagId = diagram_id, @UIDFound = principal_id from dbo.sysdiagrams where principal_id = @owner_id and name = @diagramname </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@DiagId IS NULL or (@IsDbo = 0 and @UIDFound <> @theId))</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR ('Diagram does not exist or you do not have permission.', 16, 1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return -3</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp -- if((@u_name is not null) and (@new_diagramname = @diagramname))&nbsp&nbsp&nbsp&nbsp&nbsp -- nothing will change</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp --&nbsp&nbsp&nbsp&nbsp&nbsp return 0;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@u_name is null)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @DiagIdTarg = diagram_id from dbo.sysdiagrams where principal_id = @theId and name = @new_diagramname</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp else</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select @DiagIdTarg = diagram_id from dbo.sysdiagrams where principal_id = @owner_id and name = @new_diagramname</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if((@DiagIdTarg is not null) and&nbsp&nbsp @DiagId <> @DiagIdTarg)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR ('The name is already used.', 16, 1);</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return -2</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp if(@u_name is null)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp update dbo.sysdiagrams set [name] = @new_diagramname, principal_id = @theId where diagram_id = @DiagId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp else</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp update dbo.sysdiagrams set [name] = @new_diagramname where diagram_id = @DiagId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return 0</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sp_renamediagram Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sp_renamediagram Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc312"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">sp_upgraddiagrams&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: sp_upgraddiagrams </TT><BR><TT> */</TT><BR><TT></TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp CREATE PROCEDURE sp_upgraddiagrams</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp AS</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp IF OBJECT_ID(N'dbo.sysdiagrams') IS NOT NULL</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return 0;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CREATE TABLE dbo.sysdiagrams</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp name sysname NOT NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp principal_id int NOT NULL,&nbsp&nbsp&nbsp&nbsp&nbsp -- we may change it to varbinary(85)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp diagram_id int PRIMARY KEY IDENTITY,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp version int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp definition varbinary(max)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CONSTRAINT UK_principal_name UNIQUE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp principal_id,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp name</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp )</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp );</TT><BR><TT></TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp /* Add this if we need to have some form of extended properties for diagrams */</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp /*</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp IF OBJECT_ID(N'dbo.sysdiagram_properties') IS NULL</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CREATE TABLE dbo.sysdiagram_properties</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp diagram_id int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp name sysname,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp value varbinary(max) NOT NULL</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp )</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp */</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp IF OBJECT_ID(N'dbo.dtproperties') IS NOT NULL</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp begin</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp insert into dbo.sysdiagrams</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp (</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [name],</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [principal_id],</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [version],</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp [definition]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp )</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp select&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp convert(sysname, dgnm.[uvalue]),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp DATABASE_PRINCIPAL_ID(N'dbo'),&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp -- will change to the sid of sa</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp 0,&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp -- zero for old format, dgdef.[version],</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp dgdef.[lvalue]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp from dbo.[dtproperties] dgnm</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp inner join dbo.[dtproperties] dggd on dggd.[property] = 'DtgSchemaGUID' and dggd.[objectid] = dgnm.[objectid]&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp inner join dbo.[dtproperties] dgdef on dgdef.[property] = 'DtgSchemaDATA' and dgdef.[objectid] = dgnm.[objectid]</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp where dgnm.[property] = 'DtgSchemaNAME' and dggd.[uvalue] like N'_EA3E6268-D998-11CE-9454-00AA00A3F36E_' </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return 2;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp end</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp return 1;</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sp_upgraddiagrams Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sp_upgraddiagrams Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc313"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SubjectDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SubjectDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SubjectDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesSubjectName&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Subject</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesSubjectName = @SeriesSubjectName</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'SubjectDelProc: Cannot delete because foreign keys still exist in Subject '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SubjectDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SubjectDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc314"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SubjectInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SubjectInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SubjectInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @QualifierId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesSubjectName&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO Subject(SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesSubjectName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemId)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @SeriesSubjectName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ModifiedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @ItemId)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'SubjectInsProc: Cannot insert because primary key value not found in Subject '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SubjectInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SubjectInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc315"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SubjectSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SubjectSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SubjectSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesSubjectName&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100))</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesSubjectName,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SeriesSubjectId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM Subject</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesSubjectName = @SeriesSubjectName</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SubjectSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SubjectSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc316"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">SubjectUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: SubjectUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE SubjectUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @QualifierId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesSubjectName&nbsp&nbsp&nbsp&nbsp&nbsp varchar(100),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp datetime&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varchar(50)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @SeriesSubjectId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE Subject</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET SeriesId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @SeriesId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp QualifierId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @QualifierId,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp CreatedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @CreatedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedDate&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedDate,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ModifiedBy&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ModifiedBy,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ItemId&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @ItemId</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE SeriesSubjectName = @SeriesSubjectName</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'SubjectUpdProc: Cannot update&nbsp&nbsp in Subject '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SubjectUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">SubjectUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc317"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">sysdiagramsDelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: sysdiagramsDelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE sysdiagramsDelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @diagram_id&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp DELETE</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM sysdiagrams</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE diagram_id = @diagram_id</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20002 'sysdiagramsDelProc: Cannot delete because foreign keys still exist in sysdiagrams '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sysdiagramsDelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sysdiagramsDelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc318"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">sysdiagramsInsProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: sysdiagramsInsProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE sysdiagramsInsProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @name&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp char(10),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @principal_id&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @version&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @definition&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varbinary(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp INSERT INTO sysdiagrams(name,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp principal_id,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp version,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp definition)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp VALUES(@name,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @principal_id,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @version,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp @definition)</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20000 'sysdiagramsInsProc: Cannot insert because primary key value not found in sysdiagrams '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sysdiagramsInsProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sysdiagramsInsProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc319"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">sysdiagramsSelProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: sysdiagramsSelProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE sysdiagramsSelProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @diagram_id&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp SELECT name,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp principal_id,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp diagram_id,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp version,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp definition</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp FROM sysdiagrams</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE diagram_id = @diagram_id</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sysdiagramsSelProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sysdiagramsSelProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<HR>
<A NAME = "Proc320"></A>
<TABLE WIDTH=100% CELLPADDING=1 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="darkblue" ><B><FONT SIZE=5 COLOR="white" FACE="Arial">sysdiagramsUpdProc&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Owner&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">dbo&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Description&nbsp;</FONT></B></TD>
<TD><FONT SIZE=2 FACE="Arial">&nbsp;</FONT></TD>
</TR>
<TR>
<TD VALIGN=TOP WIDTH=20%% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">SQL&nbsp;</FONT></B></TD>
<TD><TT><TT></TT><BR><TT></TT><BR><TT>/* </TT><BR><TT> * PROCEDURE: sysdiagramsUpdProc </TT><BR><TT> */</TT><BR><TT></TT><BR><TT>CREATE PROCEDURE sysdiagramsUpdProc</TT><BR><TT>(</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @name&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp char(10),</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @principal_id&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @diagram_id&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @version&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp int&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp @definition&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp varbinary(max)&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = NULL)</TT><BR><TT>AS</TT><BR><TT>BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp UPDATE sysdiagrams</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp SET name&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @name,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp principal_id&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @principal_id,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp version&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @version,</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp definition&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp = @definition</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp WHERE diagram_id = @diagram_id</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp IF (@@error!=0)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp BEGIN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RAISERROR&nbsp&nbsp 20001 'sysdiagramsUpdProc: Cannot update&nbsp&nbsp in sysdiagrams '</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp ROLLBACK TRAN</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp RETURN(1)</TT><BR><TT>&nbsp&nbsp&nbsp&nbsp </TT><BR><TT>&nbsp&nbsp&nbsp&nbsp END</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp COMMIT TRAN</TT><BR><TT></TT><BR><TT>&nbsp&nbsp&nbsp&nbsp RETURN(0)</TT><BR><TT>END</TT>&nbsp;</TT></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sysdiagramsUpdProc Object Permissions&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">User/Role Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Grantee Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Permission Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Action Type&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is Action Extended&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=22% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Is System&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<P>
<TABLE WIDTH=100% CELLPADDING=3 BORDER=2>
<TR>
<TD VALIGN=TOP BGCOLOR="LIGHTGREY" ><B><FONT SIZE=4 FACE="Arial">sysdiagramsUpdProc Bound Attachments&nbsp;</FONT></B></TD>
</TR>
</TABLE>
<TABLE WIDTH=100% CELLPADDING=2 BORDER=2>
<TR>
<TD VALIGN=TOP  WIDTH=30% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Name&nbsp;</FONT></B></TD>
<TD VALIGN=TOP  WIDTH=46% bgcolor="#87BCFF"><B><FONT SIZE=2 FACE="Arial">Current Value&nbsp;</FONT></B></TD>
</TR>
</TABLE>
</BODY>
</HTML>
